# eric7.WebBrowser.AdBlock.AdBlockIcon

Module implementing the AdBlock icon for the main window status bar.

### Global Attributes

None

### Classes

AdBlockIcon | Class implementing the AdBlock icon for the main window status bar.

### Functions

None

## AdBlockIcon

Class implementing the AdBlock icon for the main window status bar.

### Derived from

EricClickableLabel

### Class Attributes

None

### Class Methods

None

### Methods

AdBlockIcon | Constructor
__aboutToShowMenu | Private slot to show the context menu.
__enableAdBlock | Private slot to enable or disable AdBlock.
__isCurrentHostExcepted | Private method to check, if the host of the current browser is excepted.
__setException | Private slot to add or remove the current host from the list of exceptions.
__showMenu | Private slot to show the context menu.
currentChanged | Public slot to handle a change of the current browser tab.
menu | Public method to get a reference to the menu.
setEnabled | Public slot to set the enabled state.
sourceChanged | Public slot to handle URL changes.

### Static Methods

None

#### AdBlockIcon (Constructor)

AdBlockIcon(parent)

Constructor

parent (WebBrowserWindow)
  reference to the parent widget

#### AdBlockIcon.__aboutToShowMenu

__aboutToShowMenu()

Private slot to show the context menu.

#### AdBlockIcon.__enableAdBlock

__enableAdBlock(enable)

Private slot to enable or disable AdBlock.

enable (bool)
  flag indicating the desired enable state

#### AdBlockIcon.__isCurrentHostExcepted

__isCurrentHostExcepted()

Private method to check, if the host of the current browser is excepted.

Return:
  flag indicating an exception

Return Type:
  bool

#### AdBlockIcon.__setException

__setException(enable)

Private slot to add or remove the current host from the list of exceptions.

enable (bool)
  flag indicating to set or remove an exception

#### AdBlockIcon.__showMenu

__showMenu(pos)

Private slot to show the context menu.

pos (QPoint)
  position the context menu should be shown

#### AdBlockIcon.currentChanged

currentChanged()

Public slot to handle a change of the current browser tab.

#### AdBlockIcon.menu

menu()

Public method to get a reference to the menu.

Return:
  reference to the menu

Return Type:
  QMenu

#### AdBlockIcon.setEnabled

setEnabled(enabled)

Public slot to set the enabled state.

enabled (bool)
  enabled state

#### AdBlockIcon.sourceChanged

sourceChanged(browser, _url)

Public slot to handle URL changes.

browser (WebBrowserView)
  reference to the browser
_url (QUrl)
  new URL (unused)

Up